package Java.BlackHorse.a05IOTest;

import java.io.FileWriter;
import java.io.IOException;

public class Test1 {
    /*
    * void write(int c)
    * void write(char[] cbuf)
    * void write(char[] cbuf,int off,int len)
    * void write(String str)
    * void write(String str,int off,int len)
    * */
    public static void main(String[] args) throws IOException {
        FileWriter fw = new FileWriter("IO\\CharStream\\c.txt",true);
        int c = 97;
        fw.write(c);

        char[] cbuf = {'\n','a','b','c'};
        fw.write(cbuf);
        fw.write(cbuf,0,2);

        String str = "\n123";
        fw.write(str);
        fw.write(str,0,3);

        fw.close();
    }
}
